package src.montecarlo;

import java.awt.image.SampleModel;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import src.utils.NormalFunction;
import src.utils.ProbabilityDistributionFunction;

public class ChangingSampleSize {

	public static void main(String[] argvs) throws IOException{
	
	int sampleSize = 1;
	double delta = 1;
	
	double mean = 0; double sigma = 1;
	ProbabilityDistributionFunction normal = new NormalFunction(mean,sigma);

	FileOutputStream fos = new FileOutputStream(new File("meanAndSigma"));
	
	for(sampleSize=50;sampleSize<30000;sampleSize+=100){
		MetropolisMonteCarlo simulator = new MetropolisMonteCarlo(normal,sampleSize,delta,0);
		simulator.metropolisAlgorithm("output"+sampleSize);
		fos.write((sampleSize+","+simulator.getMean()+","+simulator.getSigma()+"\n").getBytes());
	}
	fos.flush();
	fos.close();
	}
}
